package com.gblfy.email.config;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class EmailAuthenticatorConfig extends Authenticator {

    String userName = null;

    String password = null;

    public EmailAuthenticatorConfig() {
    }

    public EmailAuthenticatorConfig(String username, String password) {
        this.userName = username;
        this.password = password;
    }

    @Override
    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, password);
    }
}
